-- INSERT INTO dbo.t_ReleaseObjects( Parent, Scope)VALUES( 1, 'G')
-- p_InsDBObj "S",123,"admin",0,"JAN","PMO","PMO","PMO","ADMIN","ADMIN","ADMIN","PM","O","PMO","12-12-2010","NA"
-- p_InsDBObj "M",123,"admin",0,"JAN","PMO","PMO","SvnPath","PMO","ADMIN","ADMIN","ADMIN","PM","O","PMO","12-12-2010","NA"
use common
go
IF OBJECT_ID('dbo.p_InsDBObj') IS NOT NULL
BEGIN
    DROP PROCEDURE dbo.p_InsDBObj
    IF OBJECT_ID('dbo.p_InsDBObj') IS NOT NULL
        PRINT '<<< FAILED DROPPING PROCEDURE dbo.p_InsDBObj >>>'
    ELSE
        PRINT '<<< DROPPED PROCEDURE dbo.p_InsDBObj >>>'
END
go
create proc p_InsDBObj
(
	@DBName				varchar(30),	-- @DBName
	@Hostname			varchar(250),	
	@LoginName			varchar(30),	--  
	@Pass				varchar(30),	-- 
	@Port				varchar(30),	-- 
	@DBType				varchar(30)	-- 
	
) as
begin
	-- declares
     INSERT INTO t_DatabaseName 
     VALUES ()

     
			insert into t_DatabaseName 
			( DBName, Hostname,LoginName,Pass, Port,
			DBType)
			values
			(@DBName, @Hostname,@LoginName,@Pass, @Port,
			@DBType)
	return 0 
End

go
EXEC sp_procxmode 'dbo.p_InsDBObj','unchained'
go
IF OBJECT_ID('dbo.p_InsDBObj') IS NOT NULL
    PRINT '<<< CREATED PROCEDURE dbo.p_InsDBObj >>>'
ELSE
    PRINT '<<< FAILED CREATING PROCEDURE dbo.p_InsDBObj >>>'
go
GRANT EXECUTE ON dbo.p_InsDBObj TO public
go